<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <title>第十二课 DOM（DOM操作）</title>
</head> 
<body>
    <div id="div1">
        <div class="xxkt">星星课堂</div>
        <div class="xxkt">xingxingclassroom</div>
    </div>
    <script>
        var div1 = document.getElementById('div1');
        var divs = div1.getElementsByClassName('xxkt');
        console.log(divs);//HTMLCollection(2) [div.xxkt, div.xxkt]
        console.log(div1.childNodes);//NodeList(5) [text, div.xxkt, text, div.xxkt, text]
    </script>
</body> 
</html>